package com.loanapp.server.market.provider.modular.bbs.service;


import com.github.pagehelper.PageInfo;
import com.loanapp.base.common.exception.BusinessException;
import com.loanapp.base.database.common.base.BaseService;
import com.loanapp.server.market.api.bbs.entity.Post;
import com.loanapp.server.market.api.bbs.query.PostQuery;

import java.util.Map;

public interface PostService extends BaseService<Post,PostQuery,Long> {
    /**
     * 获取帖子列表（带评论条数）
     * @return
     */
    public PageInfo<Map<String,Object>> getPostListPage(PostQuery query, int[] pageParams) throws BusinessException;

    /**
     * 通过id获取帖子（带评3论条数）
     * @return
     */
    public Map<String,Object> getPostWithCommentById(Long id) throws BusinessException;

    public boolean CanPost(Long borrowerId) throws  BusinessException;

}
